package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_ctdt_monhoc_tienquyet")
public class Tbl_CTDT_MonHoc_TienQuyet implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private String ma;
   private Tbl_CTDT_MonHoc monHoc1Id = null;
   private Tbl_CTDT_MonHoc monHoc2Id = null;
   private Tbl_CTDT_KhoiNganh khoiNganhId = null;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   public String getMa() {
   	return ma;
   }
   public void setMa(String ma) {
   	this.ma= ma;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="MonHoc1Id")
   @ForeignKey(name="FK_tbl_CTDT_MonHoc_tbl_CTDT_MonHoc_TienQuyet1")
   public Tbl_CTDT_MonHoc getMonHoc1Id() {
	    return monHoc1Id;
   }
   public void setMonHoc1Id(Tbl_CTDT_MonHoc monHoc1Id) {
	    this.monHoc1Id=monHoc1Id;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="MonHoc2Id")
   @ForeignKey(name="FK_tbl_CTDT_MonHoc_tbl_CTDT_MonHoc_TienQuyet2")
   public Tbl_CTDT_MonHoc getMonHoc2Id() {
	    return monHoc2Id;
   }
   public void setMonHoc2Id(Tbl_CTDT_MonHoc monHoc2Id) {
	    this.monHoc2Id=monHoc2Id;
   }
   
   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="KhoiNganhId")
   @ForeignKey(name="FK_tbl_CTDT_MonHoc_TienQuyet_tbl_CTDT_KhoiNganh")
   public Tbl_CTDT_KhoiNganh getKhoiNganhId() {
	    return khoiNganhId;
   }
   public void setKhoiNganhId(Tbl_CTDT_KhoiNganh khoiNganhId) {
	    this.khoiNganhId=khoiNganhId;
   }
}//endClass 

